home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- # postinst script for cupsys-driver-gutenprint
- #
- # see: dh_installdeb(1)
-
- set -e
-
- # summary of how this script can be called:
- # * <postinst> `configure' <most-recently-configured-version>
- # * <old-postinst> `abort-upgrade' <new version>
- # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
- # <new-version>
- # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
- # <failed-install-package> <version> `removing'
- # <conflicting-package> <version>
- # for details, see /usr/doc/packaging-manual/
- #
- # quoting from the policy:
- # Any necessary prompting should almost always be confined to the
- # post-installation script, and should be protected with a conditional
- # so that unnecessary prompting doesn't happen if a package's
- # installation fails and the `postinst' is called with `abort-upgrade',
- # `abort-remove' or `abort-deconfigure'.
-
- #s/^if\s+\[\s+"\$1"\s+=\s+"configure"\s+\];\s+then\s+ldconfig\b//m;
-
- if [ "$1" = "configure" ]; then
- # Upgrade in-use PPD files
- /usr/sbin/cups-genppdupdate.5.0 > /dev/null
-
- # Delete all old PPDs, we let CUPS auto-generate the PPDs on the fly
- if [ -h /usr/share/ppd/gutenprint ] || [ -e /usr/share/ppd/gutenprint ]; then
- rm -f /usr/share/ppd/gutenprint/*/*/*.ppd.gz 2>/dev/null || :
- rmdir --ignore-fail-on-non-empty /usr/share/ppd/gutenprint/*/* 2>/dev/null || :
- rmdir --ignore-fail-on-non-empty /usr/share/ppd/gutenprint/* 2>/dev/null || :
- rmdir --ignore-fail-on-non-empty /usr/share/ppd/gutenprint 2>/dev/null || \
- rm -f /usr/share/ppd/gutenprint 2>/dev/null || :
- fi
- if [ -h /usr/share/cups/model/gutenprint ] || [ -e /usr/share/cups/model/gutenprint ]; then
- rm -f /usr/share/cups/model/gutenprint/*/*/*.ppd.gz 2>/dev/null || :
- rmdir --ignore-fail-on-non-empty /usr/share/cups/model/gutenprint/*/* 2>/dev/null || :
- rmdir --ignore-fail-on-non-empty /usr/share/cups/model/gutenprint/* 2>/dev/null || :
- rmdir --ignore-fail-on-non-empty /usr/share/cups/model/gutenprint 2>/dev/null || \
- rm -f /usr/share/cups/model/gutenprint 2>/dev/null || :
- fi
-
- # Restart CUPSys (to register updated PPDs)
- [ -x /etc/init.d/cupsys ] && invoke-rc.d cupsys force-reload || true
- elif [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-remove" ] || [ "$1" = "abort-deconfigure" ]; then
- :
- else
- echo "postinst called with unknown argument \`$1'" >&2
- exit 0
- fi
-
- # dh_installdeb will replace this with shell code automatically
- # generated by other debhelper scripts.
-
-
-
- exit 0
-
-
-